{extend name="public/base"/}
{block name="style"}
<link rel="stylesheet" href="__PUBLIC__/plugs/tagsinput/bootstrap-tagsinput.css">
<script src="__PUBLIC__/plugs/tagsinput/bootstrap-tagsinput.js"></script>

<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugs/webuploader/webuploader.css">
<!-- 配置文件 -->
<script type="text/javascript" src="__PUBLIC__/plugs/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__PUBLIC__/plugs/ueditor/ueditor.all.min.js"></script>
<!-- datepicker statr -->
<link href="__PUBLIC__/plugs/datepicker/css/foundation-datepicker.min.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/plugs/datepicker/js/foundation-datepicker.js"></script>
<script src="__PUBLIC__/plugs/datepicker/js/foundation-datepicker.zh-CN.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugs/board/board.min.css">
<!-- datepicker end -->
{/block}
{block name="body"}
<div class="main-box clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>{$meta_title}</h2>
		</div>
	</header>
	<div class="main-box-body clearfix">
		<form method="post" class="form form-horizontal">
			{if !isset($info)}
			{assign name="info" value="" /}
			{/if}
			{if !empty($fieldGroup)}
			<div class="tabs-wrapper">
				<ul class="nav nav-tabs">
					{volist name="fieldGroup" id="vGroup"}
					<li {if $i eq 1}class="active"{/if}><a href="#tab{$key}" data-toggle="tab">{$key}</a></li>
					{/volist}
				</ul>
				<div class="tab-content">
					{volist name="fieldGroup" id="vGroup"}
					<div class="tab-pane fade {if condition="$i eq 1"}in active{/if}" id="tab{$key}">
						{volist name="vGroup" id="field"}
						{if $field['type'] eq 'hidden'}
						<input type="hidden" name="{$field['name']}" value="{$info[$field['name']]|default=''}"/>
						{else/}
						<div class="form-group">
							<label class="col-lg-2 control-label">{$field['title']|htmlspecialchars}</label>
							<div class="col-lg-10 col-sm-10">
								{:widget('common/Form/show',array($field,$info))}
								<div class="help-block">{$field['help']|default=''}</div>
							</div>
						</div>
						{/if}
						{/volist}
					</div>
					{/volist}
				</div>
			</div>
			{elseif isset($keyList) /}
			{volist name="keyList" id="field"}
			{if $field['type'] eq 'hidden'}
			<input type="hidden" name="{$field['name']}" value="{$info[$field['name']]|default=''}"/>
			{else/}
			<div class="form-group">
				<label class="col-lg-2 control-label">{$field['title']|htmlspecialchars}</label>
				<div class="col-lg-10 col-sm-10">
					{:widget('common/Form/show',array($field,$info))}
					<div class="help-block">{$field['help']|default=''}</div>
				</div>
			</div>
			{/if}
			{/volist}
			{/if}
			<div class="form-group">
				<div class="col-lg-offset-2 col-lg-10">
					<input type="hidden" name="id" value="{$info['id']|default=''}">            
					<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
					<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript" src="__PUBLIC__/plugs/webuploader/webuploader.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/plugs/webuploader/webuploader.custom.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/droppable.js"></script>
<script type="text/javascript" src="__PUBLIC__/plugs/board/board.min.js"></script>
{/block}